﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CommentForm.ascx.cs" Inherits="smartphone.UserControls.CommentForm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>

<script type="text/javascript">
</script>
<asp:Label ID="LabelCommentForm" CssClass="headerTemplate" runat="server" Text="Nhập bình luận của bạn"></asp:Label>
<div id="comment-form">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
    <p>
    <asp:Label ID="LabelComment" CssClass="commentInform" runat="server" Text="" Visible="false"></asp:Label>
    </p>

    <p>
    <label>Tên của bạn </label><asp:TextBox ID="TxtName" CssClass="commentName" runat="server" Width="490" Height="25" EnableViewState="False"></asp:TextBox>
        <p><asp:RequiredFieldValidator ID="RequiredFieldValidatorName" runat="server" ErrorMessage="Bạn cần nhập tên của mình" ControlToValidate="TxtName" CssClass="validateError"></asp:RequiredFieldValidator></p>
    </p>
    <p>
    <label>Email </label><asp:TextBox ID="TxtEmail" CssClass="commentEmail" runat="server" Width="490" Height="25" EnableViewState="False"></asp:TextBox>
        <p>
            <asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" runat="server" ErrorMessage="Bạn phải nhập mail hợp lệ" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtEmail" CssClass="validateError"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" CssClass="validateError" runat="server" ErrorMessage="Bạn chưa nhập email" ControlToValidate="TxtEmail"></asp:RequiredFieldValidator>
        </p>
    </p>

    <p>
    <label>Nội dung bình luận </label> <asp:TextBox ID="CommentContent" TextMode="MultiLine" Width="490" Height="300" runat="server"></asp:TextBox>
        <p>
            <asp:CustomValidator ID="CustomValidatorContent" runat="server" ErrorMessage="Nội dung comment phải dài hơn 50 kí tự" ControlToValidate="CommentContent" CssClass="validateError"></asp:CustomValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="validateError" ErrorMessage="Bạn chưa nhập nội dung comment" ControlToValidate="CommentContent"></asp:RequiredFieldValidator>
        </p>
    </p>

    <asp:Button ID="BtPostComment" CssClass="commentSubmit" runat="server" Text="Bình luận" OnClick="BtPostComment_Click" />
</div>